package com.milhouz.wormdroid.gl.model.hud;

import android.graphics.Paint;

import com.milhouz.wormdroid.gl.model.text.TextSprite;

public class FpsHudSprite extends TextSprite {

	public FpsHudSprite(float x, float y, Paint paint) {
		super(HudSpriteNames.FPS_SPRITE, x, y, paint);
	}

	
	@Override
	public void update(String... values) {
		setText(String.valueOf(Double.valueOf(Integer.valueOf(values[0]) > 0 ? 1000.0 / Integer.valueOf(values[0]) : 0.0).intValue()));
	}


	@Override
	public void setText(String text) {
		super.setText(text + " fps");
	}
	
}
